package rewards.domain.reward;

import rewards.AccountContribution;
import rewards.Dining;
import rewards.RewardConfirmation;

/**
 * Handles creating records of reward transactions to track contributions made
 * to accounts for dining at restaurants.
 */
public interface RewardRepository {

	/**
	 * Create a record of a reward that will track a contribution made to an
	 * account for dining.
	 * 
	 * @param contribution
	 *            the account contribution that was made
	 * @param dining
	 *            the dining event that resulted in the account contribution
	 * @return a reward confirmation object that can be used for reporting and
	 *         to lookup the reward details at a later date
	 */
	public RewardConfirmation confirmReward(AccountContribution contribution,
			Dining dining);

	/**
	 * Find a reward given its contribution number.
	 * 
	 * @param contributionNumber
	 * @return The reward if found.
	 */
	public Reward findReward(String confirmationNumber);
}